package com.hafu.service;

import com.hafu.dao.KhinfoDao;
import com.hafu.model.Khinfo;

import java.util.ArrayList;

public class KhinfoService {
    private KhinfoDao khinfoDao = new KhinfoDao();

    public static ArrayList<Khinfo> getkhinfoByName(Khinfo khinfo) {
        return null;
    }

    public static Boolean addkhinfo(Khinfo khinfo) {

        return null;
    }

    public Boolean addKhinfo(Khinfo kh){
        Boolean aBoolean = khinfoDao.addKhinfo(kh);
        return aBoolean;
    }
    public Boolean deleteKhinfo(String id){
        return khinfoDao.deleteKhinfo(Integer.parseInt(id));
    }
    public ArrayList<Khinfo> getKhinfoByName(Khinfo kh){
        ArrayList<Khinfo> khinfos = khinfoDao.getKhinfoByName(kh);
        return khinfos;
    }
    public Boolean updateKhinfo(Khinfo kh){
        Boolean aBoolean = khinfoDao.updateKhinfo(kh);
        return aBoolean;
    }
}
